-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: Add DeepSeek R1 support to Chutes provider (#4523) #4525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like the tests are being migrated to use .spec due to a monorepo.md rule.
It should also handle the Deepseek Chimera model.
LGTM
|
Looks like some test conflicts unfortunately. Do you mind updating and I'll take another look at approve once it's done? |
- Modified BaseOpenAiCompatibleProvider to expose client as protected - Enhanced ChutesHandler to detect DeepSeek R1 models and parse reasoning chunks - Applied R1 format conversion for message formatting - Set appropriate temperature (0.6) for DeepSeek models - Migrated tests from Jest to Vitest format - Added comprehensive tests for DeepSeek R1 functionality This ensures reasoning chunks are properly separated from regular content when using DeepSeek R1 models via Chutes provider.
|
@mrubens |
| protected readonly options: ApiHandlerOptions | ||
|
|
||
| private client: OpenAI | ||
| protected client: OpenAI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this one necessary to change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mind, I see now
* feat: Add DeepSeek R1 support to Chutes provider (#4523) - Modified BaseOpenAiCompatibleProvider to expose client as protected - Enhanced ChutesHandler to detect DeepSeek R1 models and parse reasoning chunks - Applied R1 format conversion for message formatting - Set appropriate temperature (0.6) for DeepSeek models - Migrated tests from Jest to Vitest format - Added comprehensive tests for DeepSeek R1 functionality This ensures reasoning chunks are properly separated from regular content when using DeepSeek R1 models via Chutes provider. * feat: Enhance DeepSeek R1 support with <think> tag handling in Chutes provider * fix: Correct temperature retrieval in ChutesHandler to use model's info * fix: Update condition for DeepSeek-R1 model identification in createMessage method --------- Co-authored-by: Daniel Riccio <[email protected]>
Description
Fixes #4523
This PR adds support for DeepSeek R1 models when using the Chutes provider. Previously, when using DeepSeek R1 models via Chutes, the reasoning format wasn't recognized, causing reasoning blocks to be merged with regular content and degrading model performance.
Changes Made
BaseOpenAiCompatibleProviderto expose theclientproperty asprotectedinstead ofprivate, allowing subclasses to access the OpenAI clientChutesHandlerto:delta.reasoningin the streamTesting
Verification of Acceptance Criteria
Checklist
Important
Adds support for DeepSeek R1 models in Chutes provider, handling reasoning formats and temperature settings, with tests migrated to Vitest.
ChutesHandlernow detects DeepSeek R1 models by checking if model ID starts with "deepseek-ai/DeepSeek-R1".delta.reasoningin the stream.BaseOpenAiCompatibleProvider:clientproperty changed from private to protected.ChutesHandler: ImplementscreateMessage()to handle DeepSeek R1 models with<think>tags.getModel()inChutesHandleradjusts temperature for DeepSeek R1 models.chutes.spec.ts.This description was created by
for 9810152e6065c25dd3556866edb981515f7b9c3d. You can customize this summary. It will automatically update as commits are pushed.